@robert-hh Thanks for the tips. I ended up doing below, which does save 32bytes over struct.pack. self.tempBuff = bytearray(3) def _writeWord(self,address,data): #self.i2c.writeto_mem(self.address, address, struct.pack(">H", data), addrsize=8 ) self.tempBuff[0] = address self.tempBuff[1] = data >> 8 self.tempBuff[2] = data & 0xff self.i2c.writeto(self.address, self.tempBuff)